<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<title>友情链接编辑器 -- Powered by CentIMS {$core_version}</title>
		<link href="{'bootstrap/css/bootstrap.css'|shared}" rel="stylesheet"/>
		<link href="{'bootstrap/css/bootstrap-responsive.css'|shared}" rel="stylesheet"/>		
		<link href="{'common.css'|shared}" rel="stylesheet"/>		
	</head>
	<body>
		<div class="workspace">
			{include file='core/views/vfs/vfs_navi.tpl'}
		    {if $page_tip_info}
		    <div class="alert {$alert_cls}">
		        <button class="close" data-dismiss="alert">×</button>
		        {$page_tip_info}
	      	</div>
	      	{/if}
		</div>
		<div>			
			<form class="form-horizontal" id="link-form" method="POST" action="./?Ctlr=SaveLink">
				<input type="hidden" name="link_id" id="link_id" value="{$link_id}"/>
	        	<fieldset>
	        		<div class="control-group {$error_cls.name}">
	          			<label class="control-label" for="name">网站名称</label>
	            		<div class="controls">
              				<input type="text" class="span5" id="name" name="name" value="{$name}"/>
	            		</div>
	          		</div>         		
	          		<div class="control-group {$error_cls.title}">
	          			<label class="control-label" for="title">描述</label>
	            		<div class="controls">
	              			<input rel="popover" data-content="通常，当访客将鼠标光标悬停在链接表链接的上方时，它会显示出来。" data-original-title="描述" type="text" class="span5" id="title" name="title" value="{$title}">
	              			<span class="help-inline">{$error.title}</span>
	            		</div>
	          		</div>          
	          		
	          		<div class="control-group {$error_cls.url}">
	            		<label class="control-label" for="url">URL</label>
	            		<div class="controls">
	              			<input rel="popover" data-content="例子：http://www.centims.com/ —— 不要忘了 http://" data-original-title="URL" type="text" class="span5" id="url" name="url" value="{$url}" placeholder="http://"/>
	              			<span class="help-inline">{$error.url}</span>
	            		</div>
	          		</div>
	          		
	          		<div class="control-group {$error_cls.type}">
	            		<label class="control-label" for="type">类型</label>
	            		<div class="controls">
	              			<select name="type" id="type">
	              				{html_options values=$types output=$types selected=$type}
	              			</select>
	              			<span class="help-inline">{$error.type}</span>
	            		</div>
	          		</div>
	          		
	          		<div class="control-group {$error_cls.icon}">
	            		<label class="control-label" for="icon">网站图片</label>
	            		<div class="controls">
	              			<input type="text" class="span5" name="icon" id="icon" value="{$icon}"/>
	              			<span class="help-inline">{$error.icon}</span>
	            		</div>
	          		</div>
	          		<div class="control-group {$error_cls.sort}">
	            		<label class="control-label" for="sort">显示排序</label>
	            		<div class="controls">
	              			<input type="text" class="input-small" name="sort" id="sort" value="{$sort}"/>
	              			<span class="help-inline">{$error.sort}</span>
	            		</div>
	          		</div>
	          		<div class="control-group">
	            		<label class="control-label" for="target">打开方式</label>
	            		<div class="controls">
	            			<label class="radio inline" for="target">
	              				<input type="radio" id="target" name="target" value="_blank" {'_blank'|checked:$target}/>新窗口
	              			</label>
	              			<label class="radio inline" for="target1">
	              				<input type="radio" id="target1" name="target" value="_self" {'_self'|checked:$target}/>原窗口
	              			</label>
	            		</div>
	          		</div>
	          		<div class="control-group">
	            		<label class="control-label" for="display">显示</label>
	            		<div class="controls">
	            			<label class="radio inline" for="display">
	              				<input type="radio" id="display" name="display" value="1" {'1'|checked:$display}/>是
	              			</label>
	              			<label class="radio inline" for="display1">
	              				<input type="radio" id="display1" name="display" value="0" {'0'|checked:$display}/>否 
	              			</label>      			
	            		</div>
	          		</div>
	          		
	          		<div class="control-group">
		            	<label class="control-label" for="note">备注</label>
		            	<div class="controls">
		             		<textarea class="span5" name="note" id="note" rows="3">{$note}</textarea>
		            	</div>
		          	</div> 	
		          	          		          	
		          	<div class="form-actions">
		            	<button type="submit" class="btn btn-primary">保存</button>
		            	{if !$editing}
		            	<button type="submit" name="goon" value="1" class="btn btn-primary">新增并继续</button>
		            	{/if}
		            	<a href="." class="btn">取消</a>
		          	</div>
	        	</fieldset>
	      	</form>
      	</div> 	
		<script type="text/javascript" src="{'jquery-1.7.1.js'|jquery}"></script>
		<script type="text/javascript" src="{'bootstrap/bootstrap.js'|shared}"></script>
		<script type="text/javascript" src="{'plugins/jquery.validate.js'|jquery}"></script>
		<script type="text/javascript" src="link_form.js"></script>		
	</body>
</html>
